// 购物车相关的 api 接口
import request  from '@/utils/requiest'

// 添加一个订单
export const addOrderApi= (userid : string) =>request.post('/order/addOrder', {userid})


//  查看订单的信息
export  const getOrderApi = (userid: string) =>request.post('/user/orderlist',{ userid }
)



//  修改订单的地址
interface MyOrderAddress {
    userid : string,
    name: string,
    tel: string,
    province: string,
    city: string,
    county: string,
    addressDetail: string,
    time: string,
}
export const orderAddressApi = (info:MyOrderAddress) =>request.post('/order/updateOrderAddress', info)


//  获取确认订单的 信息
export const confirmOrderApi = (userid:string, time: string) =>request.get('/order/confirmOrder',{
    params:{userid, time}
})